package com.itdaqi.gulimall.product.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itdaqi.common.utils.PageUtils;
import com.itdaqi.common.utils.Query;

import com.itdaqi.gulimall.product.dao.BrandDao;
import com.itdaqi.gulimall.product.entity.BrandEntity;
import com.itdaqi.gulimall.product.service.BrandService;


@Service("brandService")
public class BrandServiceImpl extends ServiceImpl<BrandDao, BrandEntity> implements BrandService {



    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BrandEntity> page = this.page(
                new Query<BrandEntity>().getPage(params),
                new QueryWrapper<BrandEntity>()
        );

        return new PageUtils(page);
    }

//    /**
//     * 保存添加的品牌数据
//     * @param brand
//     */
//    @Override
//    public void saveInfo(BrandEntity brand) {
//        BrandEntity brandEntity = new BrandEntity();
//      if (brandEntity.getName()==null){
//
//      }
//      baseMapper.insert(brand);
//    }

}